import turtle

turtle.hideturtle()

turtle.goto(160,0)
turtle.goto(160,160)
turtle.goto(0,160)
turtle.goto(0,0)

for i in range(0,8):

    for j in range(0,4):
        turtle.penup()
        turtle.begin_fill()
        turtle.color("black")
        turtle.goto(40*j+20*(i%2),i*20)
        turtle.pendown()
        turtle.forward(20)
        turtle.left(90)
        turtle.forward(20)
        turtle.left(90)
        turtle.forward(20)
        turtle.left(90)
        turtle.forward(20)
        turtle.left(90)
        turtle.end_fill()


turtle.done()
